package model;

/**
 * 
 * This class represents the Basic Foods. 
 * @author Roman Pusec, Dennis Goldfinger, Marko Bilic
 *
 */
public class Basic extends Food {

	private double calories;
	private double fat;
	private double protein;
	private double carbs;
	
	/**
	 * Constructor which sets the name, calories, fat, protein and carbs. 
	 * @param name Name of the Food.
	 * @param calories Calories of the Food. 
	 * @param fat Fat of the Food.
	 * @param protein Protein of the Food. 
	 * @param carbs Carbs of the Food. 
	 */
	public Basic(String name, double calories, double fat, double protein, double carbs)
	{
		super(name);
		this.calories = calories;
		this.fat = fat;
		this.protein = protein;
		this.carbs = carbs;
	}
	
	/**
	 * Returns the Food name. 
	 * @return Name name of the Food. 
	 */
	public String getName()
	{
		return this.name;
	}
	
	/**
	 * Sets the name of the Food.
	 * @param newName The new name of the Food. 
	 */
	public void setName(String newName)
	{
		this.name = newName;
	}
	
	/**
	 * Returns the calories. 
	 * @return The calories. 
	 */
	public double getCalories()
	{
		return this.calories;
	}
	
	/**
	 * Sets the calories
	 * @param newCalories New calories. 
	 */
	public void setCalories(double newCalories)
	{
		this.calories = newCalories;
	}
	
	/**
	 * Returns the fat.
	 * @return Fat.
	 */
	public double getFat()
	{
		return this.fat;
	}
	
	/**
	 * Sets the fat. 
	 * @param newFat The new Fat. 
	 */
	public void setFat(double newFat)
	{
		this.fat = newFat;
	}
	
	/**
	 * Returns the Protein of the Food. 
	 * @return The protein. 
	 */
	public double getProtein()
	{
		return this.protein;
	}
	
	/**
	 * Sets the new protein of the Food. 
	 * @param newProtein The new protein. 
	 */
	public void setProtein(double newProtein)
	{
		this.protein = newProtein;
	}
	
	/**
	 * Returns the carbs.
	 * @return The carbs. 
	 */
	public double getCarbs()
	{
		return this.carbs;
	}
	
	/**
	 * Sets the new carbs. 
	 * @param newCarbs The new carbs. 
	 */
	public void setCarbs(double newCarbs)
	{
		this.carbs = newCarbs;
	}
	
	/**
	 * Overridden toString() method which describes the given Food object. 
	 */
	public String toString()
	{
		return "Basic item:\n" + "\tName: " + this.name + "\n\tCalories: " + this.calories + "\n\tFat: " + this.fat + "\n\tProtein: " + this.protein + "\n\tCarbs: " +
				this.carbs + "\n--------------------------------------------------\n";
	}
	
}
